package com.example.timyag.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangjf
 * @time 2019-05-14 16:14
 */
@RestController
@RequestMapping("/api/v2/example")
public class Test2Controllerb {
    @Autowired
    private TestComponentb component;

    @RequestMapping(value = "/test4", method = RequestMethod.GET)
    @ResponseBody
    public String test2(@RequestParam("p2") String p2) {
        component.test();
        return "test2:" + p2;
    }

    @RequestMapping(value = "/test5", method = RequestMethod.GET)
    @ResponseBody
    public String test3(@RequestParam("p3") String p3) {

        return "test3:hello, " + p3;
    }
}
